package com.cy.store.service;

import com.cy.store.entity.Cart;
import com.cy.store.vo.CartVo;

import java.util.List;

public interface ICartService {

    /**
     * 将商品添加到购物车中
     * @param uid
     * @param pid
     * @param amount
     * @param username
     */
    void addToCart(Integer uid,Integer pid,Integer amount,String username);

    List<CartVo> getVOByUid(Integer uid);

    /**
     *
     * @param cid
     * @param uid
     * @param username
     * @return 增加成功后新的数量
     */
    Integer addNum(Integer cid,Integer uid,String username);

    List<CartVo> getVOByCids(Integer[] cids,Integer uid);

}
